package com.pug.web.user;

import com.pug.pojo.KssUser;
import com.pug.service.user.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 * Author: taimi 37310
 * Version: 1.0
 * Create Date Time: 2022/4/5 4:16.
 * Update Date Time:
 *
 * @see
 */
@Api(tags = "用户管理")
@RestController
@RequiredArgsConstructor
public class UserController {

    private final IUserService userService;
    @ApiImplicitParam(name = "id",value = "用户主键",required = true)
    @ApiOperation(value = "根据用户id获取用户信息")
    @GetMapping("/getuser/{id}")
    public KssUser getUser(@PathVariable("id")Long id){
        return userService.getById(id);
    }
}
